<template>
  <div class="landlord">
    <detail-section title="房东介绍" more-text="查看房东主页 &gt;">
      <div class="intro">
        <div class="top">
          <img :src="landlordModule.topScroll" alt="">
        </div>
        <div class="header">
          <div class="left">
            <div class="avatar">
              <img :src="landlordModule.hotelLogo" alt="">
            </div>
            <div class="info">
              <div class="name">{{ landlordModule.hotelName }}</div>
              <div class="tags">
                <template v-for="(item, index) in landlordModule.hotelTags" :key="index">
                  <div class="item" :style="{ color: item.tagText.color }">
                    <span>{{ item.tagText.text }}</span>
                    <span v-if="index !== landlordModule.hotelTags.length - 1" class="divider"> | </span>
                  </div>
                </template>
              </div>
            </div>
          </div>
          <div class="right">
            <div class="contact">联系房东</div>
          </div>
        </div>
        <div class="bottom">
          <template v-for="(item, index) in landlordModule.hotelSummary" :key="index">
            <div class="item">
              <div class="title">{{ item.title }}</div>
              <div class="score">{{ item.introduction }}</div>
              <div class="desc">{{ item.tip }}</div>
            </div>
          </template>
        </div>
      </div>
    </detail-section>
  </div>
</template>

<script setup>
import detailSection from '@/components/detail-section/detail-section.vue'
defineProps({
  landlordModule: {
    type: Object,
    default: ()=>({})
  }
})
</script>

<style lang="less" scoped>
.intro {
  .top {
    img {
      border-radius: 6px;
      width: 100%;
    }
  }
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    .left {
      display: flex;
      align-items: center;
      .avatar {
        img {
          width: 50px;
          margin-right: 5px;
        }
      }
      .info {
        display: flex;
        flex-direction: column;
        .name {
          font-size: 15px;
          font-weight: 700;
        }
        .tags {
          display: flex;
          margin-top: 3px;
        }
      }
    }
    .right {
      .contact {
        border-radius: 5px;
        padding: 5px 10px;
        color: #fff;
        background-color: #ff9645;
      }
    }
  }
  .bottom {
    display: flex;
    justify-content: space-between;
    margin: 40px 10px 0;
    .item {
      color: #666;
      .score {
        font-weight: 700;
        font-size: 16px;
        color: #333;
        margin: 5px 0;
      }
    }
  }
}
</style>
